package network.synchronizing;
import game.Game;

import java.util.Vector;

import network.dataFormats.NetworkPackage;
import physics.World;
public class SyncDataReader {
	public static void synchronize(Vector<NetworkPackage> packages, Game game) {
		for (NetworkPackage p : packages) {
			switch (p.getType()) {
				case SYNCB :
					readSyncPackage(game.engine.world, p);
					break;
			}
		}
	}
	private static void readSyncPackage(World w, NetworkPackage p) {
		SyncBody.readSyncData(w, p.getData(), p.header.time);
	}
}
